$(function(){
    var	huo_editIndex = undefined;
	/* 点击任意日期时触发该函数 */
	$('#cc').calendar({
		onSelect : function(date) {
			//alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate());
			/*修改内部数据  */
			$("#ddcalendar").window("open");	
			$('#huo_dgcc').datagrid({
				//请求地址
			    url:'../check/getcalendarAffair',
			    columns:[[
			    	{field:'',title:'',checkbox:true},
					{field:'calendarId',title:'行政事务编号',width:'10%'},
					{field:'affairBegintime',title:'开始时间',width:'159px'},
					{field:'affairEndtime',title:'结束时间',width:'159px'},
					{field:'theam',title:'主题',width:'10%'},
					{field:'remark',title:'备注',width:'10%'},
					{field:'holidayId',title:'种类',width:'10%',
						formatter: function(value,row,index){
							if (row.checkHolidayKind){
								return row.checkHolidayKind.holidayName;
							} else {
								return "";
							}
						}},
					{field:'affairId',title:'事务类型',width:'10%',
							formatter: function(value,row,index){
								if (row.checkAffariCategory){
									return row.checkAffariCategory.affairName;
								} else {
									return "";
								}
							}}
			    ]],
			    fit:true,
			    fitColumns:true,
			    //隔行变色
			    striped:true,
			    //显示行号
			    rownumbers:true,
				//显示分页栏
				pagination:true,
				//设置每页大小
				pageSize:2,
				//可选的每页大小
				pageList:[2,5,10,20,50]
			});
		}
	});
});